package commands;

import clientRequest.ClientRequest;
import controller.ExecutorsManager;
import controller.ExecutorsManager.AddFolderExecutor;

/**
 * class AddFolderCommand - execute add folder command
 */
public class AddFolderCommand {
	
	AddFolderExecutor addFolderExecutor = ExecutorsManager.getInstance().getAddFolderExecutor();
	
	/**
	 * constructor
	 */
	public AddFolderCommand(){}

	/**
	 * add the user folder
	 * @param clientRequest - a client request that contains the folder details
	 * @return 1 - if succeed. 0 - if failed.
	 */
	public int action(ClientRequest clientRequest) 
	{
		clientRequest.printRequest();
		// TODO Auto-generated method stub
		addFolderExecutor.addRequest(clientRequest.getUserID(), clientRequest.getFileName());
		return 0;
	}

}
